<template>
  <AMISRenderer :schema="schema" />
</template>

<script setup>
import AMISRenderer from '@/components/AMISRenderer.vue'

const schema = {
  type: 'page',
  body: {
    type: 'crud',
    api: '/base/log/list/login',
    syncLocation: false,
    autoFillHeight: true,
    columnsTogglable: false,
    footerToolbar: [
      'statistics',
      'switch-per-page',
      'pagination'
    ],
    autoGenerateFilter: {
      showBtnToolbar: false,
      columnsNum: 3
    },
    columns: [
      {
        name: 'userId',
        label: '用户Id'
      },
      {
          name: 'username',
          label: '用户名',
          searchable: {
            type: 'input-text',
            name: 'username',
            label: '用户名'
          }
      },
      {
          name: 'loginTypeStr',
          label: '操作类型'
      },
      {
        name: 'gmtCreated',
        label: '登录登出时间'
      },
      {
          name: 'url',
          label: 'url'
      },
      {
          name: 'ipRegion',
          label: 'ip地区'
      },
      {
          name: 'token',
          label: 'token'
      }
    ]
  }
}

</script>
